﻿#pragma once

#include "DownloadPage.g.h"
#include <winrt/Windows.UI.Core.h>
#include <winrt/Windows.UI.Xaml.Controls.h>
#include <winrt/Windows.UI.Xaml.Controls.Primitives.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Web.Http.h>
#include <winrt/Windows.Data.Json.h>
#include <winrt/Windows.Storage.h>
#include <winrt/Windows.Storage.AccessCache.h>
#include <winrt/Windows.Storage.Streams.h>
#include <winrt/Windows.Storage.Pickers.h>
#include <winrt/Windows.Networking.BackgroundTransfer.h>
#include <winrt/Windows.ApplicationModel.h>
#include <winrt/Windows.ApplicationModel.Background.h>
#include <winrt/Windows.ApplicationModel.AppService.h>
#include <winrt/Windows.Data.Xml.Dom.h>
#include <winrt/Windows.UI.Notifications.h>
#include <winrt/Windows.Networking.Sockets.h>
#include <winrt/Windows.Networking.h>
#include <winrt/Windows.Security.Cryptography.Certificates.h>
#include <vector>
#include <list>
#include <ppltasks.h>

namespace winrt::BlankApp1::implementation
{
    struct DownloadPage : DownloadPageT<DownloadPage>
    {
        DownloadPage();
        ~DownloadPage();

        winrt::Windows::Foundation::Collections::IObservableVector<IInspectable> filesList;
        std::list<hstring> path;
        winrt::hstring GetUri();
        winrt::Windows::Foundation::Collections::IObservableVector<IInspectable> FilesList();
        void FilesList(winrt::Windows::Foundation::Collections::IObservableVector<IInspectable> const& value);
        void ClickHandler(Windows::Foundation::IInspectable const& sender, Windows::UI::Xaml::RoutedEventArgs const& args);
        winrt::Windows::Foundation::IAsyncAction RefreshFilesListAsync();
        void filesList_Loaded(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::RoutedEventArgs const& e);
        winrt::Windows::Foundation::IAsyncAction hideFlyoutAsync(winrt::Windows::UI::Xaml::Controls::Flyout flyout);
        void filesListView_ItemClick(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::Controls::ItemClickEventArgs const& e);
        void AppBarButton_Click(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::RoutedEventArgs const& e);
        void AppBarButton_Click_1(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::RoutedEventArgs const& e);
        winrt::Windows::Networking::Sockets::StreamSocket socket{ nullptr };
    };
}

namespace winrt::BlankApp1::factory_implementation
{
    struct DownloadPage : DownloadPageT<DownloadPage, implementation::DownloadPage>
    {
    };
}
